package com.haizhi.crm.sys.message.model;

import com.haizhi.crm.common.model.BaseDo;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by wangshan on 2018/5/16.
 */
@Data
@Entity
@Table(name = "ts_message_category" )
public class MessageCategoryDo extends BaseDo {

    //parent_id is -1 stand for root node
    @Column(name = "parent_id" )
    private Long parentId;

    //message category tree level
    @Column(name = "level" )
    private int level;

    //message category tree is or not leaf
    @Column(name = "is_leaf" )
    private boolean isLeaf;

    @Column(name = "name" )
    private String name;

    //message type name after etl process
    @Column(name = "source_name" )
    private String sourceName;

    @Column(name = "description" )
    private String description;

    public Long getParentId() {
        return parentId;
    }

    public int getLevel() {
        return level;
    }

    public boolean isLeaf() {
        return isLeaf;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public void setLeaf(boolean leaf) {
        isLeaf = leaf;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }
}
